package com.chuanyang.driverh.mainmy;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;

import com.chuanyang.driverh.R;
import com.chuanyang.driverh.base.BaseTitleActivity;
import com.chuanyang.driverh.mainmy.fragment.CommentFragment;

public class CommentActivity extends BaseTitleActivity {
    private Fragment mFragment;
    private String driverId;
    private String fleetId;
    @Override
    protected int getContentResId() {
        return R.layout.base_single_fragment_activity;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {

    }

    @Override
    protected void initData() {
        setBackImg();
        getTitleTextView().setText("评论列表");
        Intent intent = getIntent();
        driverId = intent.getStringExtra("driverId");
        fleetId = intent.getStringExtra("fleetId");
        if (mFragment == null) {
            mFragment = createFragment();
        }
        getSupportFragmentManager().beginTransaction()
                .add(R.id.single_fragment_content, mFragment).commit();

    }
    public Fragment createFragment() {
        return CommentFragment.newInstance(driverId, fleetId);
    }

    @Override
    protected void initListener() {

    }
}
